﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Linq;
using MobiMenu.Restaurant;
using System.Data;

namespace MobiMenu.Restaurant.Data
{
    /// <summary>
    /// Data base manager.
    /// </summary>
    public class DBManager : DataContext
    {
        public Table<Advertisement> Advertisements;
        public Table<Dish> Dishes;
        public Table<Order> Orders;
        public Table<OrderedDish> OrderedDishes;


        public DBManager(string fileOrServerOrConnection)
            : base(fileOrServerOrConnection)
        { }

        public DBManager(IDbConnection connection)
            : base(connection)
        { }
    }

    /// <summary>
    /// Data base manager.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class DBManager<T> : DataContext where T : class
    {
        public Table<T> Table;


        public DBManager(string fileOrServerOrConnection)
            : base(fileOrServerOrConnection)
        { }

        public DBManager(IDbConnection connection)
            : base(connection)
        { }
    }
}